﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Practices.Unity;
using Microsoft.Practices.Prism.Regions;
using ShellInfrastructure;
using ModuleProductEdit.Views;
using ModuleProductEdit.ViewModels;

namespace ModuleProductEdit
{
    public class ProductEditModule : ModulesInfrastructure.SharedModule
    {
        protected override void RegisterViewsInRegions()
        {
            RegionManager.RegisterViewWithRegion(RegionNames.RightRegionName, () => UnityContainer.Resolve<IProductEditView>());
        }

        protected override void RegisterTypesDependencies()
        {
            UnityContainer.RegisterType<IProductEditView, ProductEditView>(new ContainerControlledLifetimeManager());
            UnityContainer.RegisterType<IProductEditViewModel, ProductEditViewModel>(new ContainerControlledLifetimeManager());
        }
    }
}
